/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package shipwright.parts;

import com.jme3.asset.AssetManager;
import com.jme3.bullet.control.RigidBodyControl;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;

/**
 *
 * @author root
 */
public class BoatBlock {

    //private static Geometry geo;
    public final static float x = .5f;
    public final static float y = .5f;
    public final static float z = .5f;
    private final static Box box = new Box(x / 2.0f, y / 2.0f, z / 2.0f);
    public final static float mass = .025f;
    private static int count = 1;
    public static Geometry buildBoatBlock(AssetManager am) {
        //if (geo == null) {
            Geometry geo = new Geometry("boatBlock0", box);
            Material mat = new Material(am, "Common/MatDefs/Light/Lighting.j3md");
            //Material mat = new Material(am, "Common/MatDefs/Misc/ShowNormals.j3md");
            mat.setTexture("DiffuseMap", am.loadTexture("/Textures/wood_texture.jpg"));
            geo.setMaterial(mat);
            return geo;
       /* } else {
            Geometry g = geo.clone();
            g.setName("boatBlock" + count);
            ++count;
            return  g;
        }*/
    }

}
